package com.message;

import com.constant.MessageType;
import lombok.Data;

/**
 * @author 罗俊华
 * @date 2021/9/1 - 4:41 下午
 */
@Data
public class RpcReqMessage extends DefaultMessage {

    private Class<?> interfaceName;

    private String targetMethodName;

    private Class<?>[] parameterTypes;

    private Object[] args;

    public RpcReqMessage(int sequenceId,Class<?> interfaceClass, String targetMethodName, Class<?>[] parameterTypes, Object[] args) {
        this.interfaceName = interfaceClass;
        this.targetMethodName = targetMethodName;
        this.parameterTypes = parameterTypes;
        this.args = args;
        super.setSequenceId(sequenceId);
    }

    public RpcReqMessage() {
    }

    @Override
    public int getMessageType() {
        return MessageType.RPC_MESSAGE_REQ;
    }
}
